/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2021.
 * Description: self-decompressed header file
 * Author: yanbo <joey.yanbo@huawei.com>
 * Create: 2020-11-19
 */
#ifndef BASE_H
#define BASE_H
#ifdef CONFIG_RTOS_HAL_SELFDECOMPRESS_MAP_PHYS_ADDR_ABOVE_4G
#include <linux/types.h>
#endif

extern void find_info_from_dtb(void *dtb_address);

extern unsigned long uart_addr;

extern unsigned long sysctl_addr;
/* secondary died */
extern unsigned long sysctl_addr_b;

extern unsigned long dtb_addr;
#ifdef CONFIG_RTOS_HAL_SELFDECOMPRESS_MAP_PHYS_ADDR_ABOVE_4G
extern void *map_hwdog_addr_above_4G(phys_addr_t var_addr);
#endif
#ifdef CONFIG_RTOS_HAL_DEBUG_LL
extern unsigned long uart_type;
#endif

#ifdef writew
#undef writew
#undef readw
#endif
extern void writew(long addr, int val);

extern unsigned int readw(long addr);

extern void putc(const char c);

extern void putstr(const char *ptr);

extern void print_number(const unsigned long num);

#ifdef CONFIG_RTOS_HAL_DEBUG_LL
extern void find_debugll(void *dtb_address);
extern unsigned int debug_ll;
#endif

void find_early_print_disabled(void *dtb_address);
#endif
